<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>库存管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    <meta content="" name="description"/>
    <meta content="" name="author"/>
    <meta name="MobileOptimized" content="320"/>
    <link href="../../resources/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/css/style-metronic.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/css/style-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/css/plugins.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/css/pages/tasks.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/>
    <link href="../../resources/css/custom.css" rel="stylesheet" type="text/css"/>
    <style>
        .checkOutLists {
            padding-left: 10px
        }

        .logo {
            padding-left: 40px;
            margin-top: -20px;
            height: 50px
        }

    </style>


</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed" onLoad="loadUserName()">
<div class="header navbar navbar-inverse navbar-fixed-top">
    <div class="header-inner">
        <a class="navbar-brand" href="#">
            <img src="../../resources/img/logo.png" alt="logo" class="logo"/>
        </a>
        <a href="javascript:;" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <img src="../../resources/img/menu-toggler.png" alt=""/>
        </a>
        <ul class="nav navbar-nav pull-right">

            <li class="dropdown user">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"
                   data-close-others="true">
                    <span id="userName" class="username" th:text="${session.currentUser.name}">管理员</span>

                    <i class="fa fa-angle-down"></i>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="extra_profile.html" th:href="@{/link/personDetails}" target="functionsList"><i class="fa fa-user"></i>个人信息</a></li>

                    <li class="divider"></li>
                    <!--<li><a href="extra_lock.html"><i class="fa fa-lock"></i> 锁屏</a></li>-->
                    <li><a href="login/index.html" th:href="@{/login/logout}"><i class="fa fa-key"></i> 退出</a></li>
                </ul>
            </li>
        </ul>
    </div>
</div>
<div class="clearfix"></div>
<div class="page-container">
    <div class="page-sidebar navbar-collapse collapse">
        <ul class="page-sidebar-menu">
            <!--<li>-->
                <!--<form class="sidebar-search" action="#" method="POST">-->
                    <!--<div class="form-container">-->
                        <!--<div class="input-box">-->
                            <!--<a href="javascript:;" class="remove"></a>-->
                            <!--<input type="text" placeholder="搜索..."/>-->
                            <!--<input type="button" class="submit" value=" "/>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</form>-->

            <!--</li>-->
            <li class="start active" style="margin-top: 65px" id="li_mainPage" onClick="showRed1()">
                <a href="mainPage.html" th:href="@{/link/mainPage}" target="functionsList">
                    <i class="fa fa-home"></i>
                    <span class="title">首页</span>
                    <span class="selected"></span>
                </a>
            </li>
            <li id="li_notice" onClick="showRed2()">
                <a href="notice.html" th:href="@{/link/notice}" target="functionsList">
                    <i class="fa fa-table"></i>
                    <span class="title">公告栏</span>
                    <span class="arrow "></span>
                </a>
            </li>
            <li id="li_storage" onClick="showRed3()">
                <a href="storage.html" th:href="@{/storage/findAllStorage}" target="functionsList">
                    <i class="fa fa-folder-open"></i>
                    <span class="title">库存管理</span>
                    <span class="arrow "></span>
                </a>
            </li>
            <li id="li_goods" onClick="showRed4()">
                <a href="goods.html" th:href="@{/product/findAllProduct}" target="functionsList">
                    <i class="fa fa-folder-open"></i>
                    <span class="title">商品管理</span>
                    <span class="arrow "></span>
                </a>
            </li>
        </ul>
    </div>

    <div class="page-content">
        <div class="row">
            <iframe class="checkOutLists" name="functionsList" zoom="1.0" th:src="@{/link/mainPage}" src="mainPage.html"
                    frameBorder="0"
                    scrolling="no" height="700px" width="1040px">
            </iframe>
        </div>

    </div>
    <!-- END PAGE -->

</div>

<div class="footer">
    <div class="footer-inner" style="margin-left:20px;margin-top:10px">
        Design by DPTeam
    </div>

</div>

<script src="../../resources/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="../../resources/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="../../resources/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../../resources/plugins/bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js"
        type="text/javascript"></script>


</body>
<script type="text/javascript">

    // <![CDATA[
    function showRed1() {
        $('li').removeClass('active');
        $('#li_mainPage').addClass('active');
    }

    function showRed2() {
        $('li').removeClass('active');
        $('#li_notice').addClass('active');
    }

    function showRed3() {
        $('li').removeClass('active');
        $('#li_storage').addClass('active');
    }

    function showRed4() {
        $('li').removeClass('active');
        $('#li_goods').addClass('active');
    }

    function loadUserName() {
        XmlHttpRequest
        xhr = new XmlHttpRequest();
        xhr.onreadystatechange = callback;
        xhr.open("GET", "login/inputMassage.html", true);
        xhr.send(null);
    }
    function callback() {
        if (xmlhttp.readState == 4) {
            if (xmlhttp.status == 200) {
                var userName = xhr.responseText;
                document.getElementById("userName").innerHTML = userName;
            }
        }
    }
    // ]]>

</script>

<!-- END BODY -->
</html>
